﻿using CoreShop.Model.FromBody;
using CoreShop.Model.FromBody.GsDataModel;
using System;
using System.Collections.Generic;

namespace CoreShop.Model
{
    /// <summary>
    /// 接口统一返回值
    /// </summary>
    public class AsyncGoodsListModel
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public bool status { get; set; } = false;

        /// <summary>
        /// 状态码
        /// </summary>
        public int code { get; set; } = 0;

        /// <summary>
        /// 状态码
        /// </summary>
        public int count { get; set; } = 0;

        /// <summary>
        /// 返回内容
        /// </summary>
        public string msg { get; set; } = string.Empty;

        /// <summary>
        /// 数据对象
        /// </summary>
        public List<corecmsfood> foodList { get; set; } = null;
    }

    /// <summary>
    /// api返回值
    /// </summary>
    public class ReturnApiModel<T>
    {
        /// <summary>
        /// 
        /// </summary>
        public string total { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<T> rows { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string msg { get; set; }
    }

    /// <summary>
    /// 接口统一返回值
    /// </summary>
    public class ApiReturnModel
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int code { get; set; } = 0;
        
        /// <summary>
        /// 返回内容
        /// </summary>
        public string msg { get; set; } = string.Empty;

        /// <summary>
        /// 数据对象
        /// </summary>
        public object data { get; set; }

        /// <summary>
        /// 回传表格的时候总数
        /// </summary>
        public int total { get; set; } = 0;

        /// <summary>
        /// 数据对象
        /// </summary>
        public List<object> rows { get; set; }

        public string syncTime { get; set; }
    }

    /// <summary>
    /// 接口统一返回值
    /// </summary>
    public class AsyncReturnModel
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public bool status { get; set; } = false;

        /// <summary>
        /// 状态码
        /// </summary>
        public int code { get; set; } = 0;

        /// <summary>
        /// 返回内容
        /// </summary>
        public string msg { get; set; } = string.Empty;

        /// <summary>
        /// 数据对象
        /// </summary>
        public object data { get; set; }


        /// <summary>
        /// 回传表格的时候总数
        /// </summary>
        public int total { get; set; } = 0;
    }


    /// <summary>
    /// 接口统一返回值
    /// </summary>
    public class BaseReturnModel
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int code { get; set; } = 0;

        /// <summary>
        /// 返回内容
        /// </summary>
        public string msg { get; set; } = string.Empty;

        /// <summary>
        /// 数据对象
        /// </summary>
        public object data { get; set; }
        
    }


    /// <summary>
    /// 接口统一返回值
    /// </summary>
    public class ApiResultModel
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int code { get; set; } = 0;

        /// <summary>
        /// 返回内容
        /// </summary>
        public string msg { get; set; } = string.Empty;


        /// <summary>
        /// 回传表格的时候总数
        /// </summary>
        public int total { get; set; } = 0;

        /// <summary>
        /// 数据对象
        /// </summary>
        public List<object> rows { get; set; }
    }

    /// <summary>
    /// 接口统一返回值
    /// </summary>
    public class ApiVipInfoModel
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int code { get; set; } = 0;

        /// <summary>
        /// 返回内容
        /// </summary>
        public string msg { get; set; } = string.Empty;


        /// <summary>
        /// 回传表格的时候总数
        /// </summary>
        public int total { get; set; } = 0;

        /// <summary>
        /// 数据对象
        /// </summary>
        public List<GsVipInfo> rows { get; set; }
    }

    /// <summary>
    /// AiCode集合
    /// </summary>
    public class GetAiCodeInfoListModel : ApiReturnModel
    {
        public List<AiCodeGetInfoListModel> rows { get; set; }
    }

    /// <summary>
    /// AiCode集合
    /// </summary>
    public class GetGsEmployeeModel : ApiReturnModel
    {
        public List<GsEmployeeModel> rows { get; set; }
    }

    /// <summary>
    /// 权限接口返回值
    /// </summary>
    public class GsMenuListModel : ApiReturnModel
    {
        /// <summary>
        /// 数据
        /// </summary>
        public new List<GsMenuModel> data { get; set; }
    }

    /// <summary>
    /// 会员下的券信息列表
    /// </summary>
    public class VipCouponInfoListModel : ApiReturnModel
    {
        public new List<VipCouponInfoModel> data { get; set; }
    }

    /// <summary>
    /// 获取券详情
    /// </summary>
    public class CouponInfoDataModel : ApiReturnModel
    {
        public new CouponInfo data { get; set; }
    }

    /// <summary>
    /// 单位数据
    /// </summary>
    public class GsSordItemUomDataModel : ApiReturnModel
    {
        public new List<corecmsfoodunit> data { get; set; }
    }

    /// <summary>
    /// 会员信息接口返回值
    /// </summary>
    public class VipInfoReturnModel : ApiReturnModel
    {
        public new GsVipInfo data { get; set; }
    }

    /// <summary>
    /// 后台设置参数
    /// </summary>
    public class BaseSettingListInfoModel : ApiReturnModel
    {
        public new BaseSettingMaster data { get; set; }
    }

    public class GetPayAccountModel : ApiReturnModel
    {
        public List<PayAccountModel> rows { get; set; }
    }

    /// <summary>
    /// 积分可兑换商品的列表
    /// </summary>
    public class CreditsExchangeListModel : ApiReturnModel
    {
        public new List<CreditsExchangeModel> data { get; set; }
    }
}
